// JavaScript Document
//改变输入框的宽度	
	$("#search").click(function(event){
		if($(window).width()>1006){
			$(this).velocity({
				width:'20%'
			},{
				duration:1000
			});
			$("#search input").fadeIn();
			$("#left-bar .nav-item").velocity({
				width:'6%'
			},{
				duration:1000
			});
		}	
		else if($(window).width()<=1006){
			$(this).velocity({
				width:'80%'
			},{
				duration:1000
			});
			$("#search input").fadeIn();
		}
		event.stopPropagation();
	});
	
	
	//还原输入框的宽度
	$(document).click(function(){
		if($(window).width()>1006){
			$("#search").velocity({
				width:'50px'
			},{
				duration:1000
			});

			$("#search input").delay(500).fadeOut();
			$("#left-bar .nav-item").velocity({
				width:'8%'
			},{
				duration:1000
			});
		}
		else if($(window).width()<=1006){
			$("#search").velocity({
				width:'50px'
			},{
				duration:1000
			});
			$("#search input").delay(500).fadeOut();	
		}
	});